<template>
	<view style="background: #F8F9F9;min-height: 100vh;width: 750rpx;display: inline-block;">
		
		<view style="padding: 20rpx; width: 700rpx;margin: 40rpx auto;background: #fff;border-radius: 20rpx;">
		<u-parse :html="content"></u-parse>
		</view>
		
	</view>
</template>

<script>
export default{
	data(){
		return{
			id:'',
			title:'',
			content:''
		}
	},
	methods:{
		detail(){
			this.$u.post('/index/detail', {
				article_id:this.id
			}).then(res => {
				this.content = res.detail;
				uni.setNavigationBarTitle({
					title:res.title
				})
			}).catch(err => {})
		}
	},
	onLoad(options) {
		if(options.txt){
			if(options.txt=='服务协议'){
				uni.setNavigationBarTitle({
					title:options.txt
				})
			}
		}
		if(options.id){
			this.id=options.id;
		   this.detail()
		}
	}
}
</script>

<style>
</style>
